#include "cell_main.h"
#include <QApplication>
#include "dlg_login.h"
#include "lib/sqlmgr.h"

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    SqlMgr::getInstance()->test();
    SqlMgr::getInstance()->init();

    Dlg_Login dlgLogin;
    int ret = dlgLogin.exec();

    //如果登陆成功，显示主窗口
    if(1== ret){
        Cell_Main w;
        w.show();
        return a.exec();
    }
    //点击退出按钮，程序直接退出
    else if(0 == ret){
        exit(0);
        return 0;
    }
    return 0;
}
